package com.jqb.jsplab.tag;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;

public class DateTag extends SimpleTagSupport{
	private String format;
	@Override
	public void doTag() throws JspException, IOException {
		SimpleDateFormat sdf = new SimpleDateFormat(this.format);
		super.getJspContext().getOut().write(sdf.format(new Date()));
	}
	public String getFormat() {
		return format;
	}
	public void setFormat(String format) {
		this.format = format;
	}

}
